<?php

require_once("vendor/autoload.php");

$config = new \Doctrine\DBAL\Configuration();
//..
$connectionParams = array(
    'dbname' => 'test',
    'user' => 'root',
    'password' => 'th',
    'host' => '127.0.0.1',
    'driver' => 'pdo_mysql',
);
$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);


$statement = $conn->prepare('SELECT * FROM user');
$statement->execute();
$users = $statement->fetchAll(PDO::FETCH_ASSOC);
exit(json_encode($users));
